﻿namespace SIR.Common
{
	/// <summary>
	/// Base class to combine common behavior between all entity objects
	/// </summary>
	public abstract class Entity : IEntity
	{
		/// <summary>
		/// Creates a new entity
		/// </summary>
		public Entity()
		{
			IsNew = true;
		}

		/// <summary>
		/// Gets or sets whether or not the object is new within the system
		/// </summary>
		[DatabaseAccess(DatabaseAccessRights.None)]
		public bool IsNew { get; set; }

		/// <summary>
		/// Gets or sets whether or not hte object should be deleted when it is saved
		/// </summary>
		[DatabaseAccess(DatabaseAccessRights.None)]
		public bool IsDeleted { get; set; }

		/// <summary>
		/// Gets of sets the ID of the image that is unique per type of object
		/// </summary>
		[DatabaseAccess(DatabaseAccessRights.Read)]
		public long Id { get; set; }
	}
}

